package com.educate.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @author yjj
 * @date 2021/11/22
 * @description: 课程实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Course {
    private long id;
    private String classId;
    @NotBlank(message = "标题不能为空")
    private String title;
    @NotBlank(message = "类别不能为空")
    private String type;
    @NotBlank(message = "封面不能为空")
    private String cover;
    private String summary;
    private String outline;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
}
